<?php
/*
 * @Author: 李明
 * @Date: 2022-01-07 10:38:10
 * @LastEditTime: 2022-01-13 08:51:49
 * @LastEditors: 李明
 * @Description: 
 * @FilePath: /CRM2.0-PHP/app/Models/RecordWorkerLogin.php
 * @山东壹零贰肆信息科技有限公司
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class RecordWorkerLogin
 * 
 * @property int $id
 * @property int|null $worker_id
 * @property string|null $worker_name
 * @property string|null $account_login
 * @property string|null $ip
 * @property string|null $user_agent
 * @property string|null $channel
 * @property Carbon|null $create_time
 * @property Carbon|null $update_time
 * 
 * @property Worker|null $worker
 *
 * @package App\Models
 */
class RecordWorkerLogin extends Model
{
    protected $table = 'record_worker_login';

    protected $casts = [
        'worker_id' => 'int'
    ];

    protected $fillable = [
        'worker_id',
        'worker_name',
        'account_login',
        'ip',
        'user_agent',
        'channel'
    ];

    public function worker()
    {
        return $this->belongsTo(Worker::class);
    }
}
